﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using RolePlayingGameData;

namespace RolePlayingGameData
{
    public class LootTable
    {
        public List<GearDrop> Drops;
        private List<GearDrop> drops
        {
            get { return drops; }
            set
            {
                drops = value;
            }
        }

        public class LootTableReader : ContentTypeReader<LootTable>
        {
            protected override LootTable Read(ContentReader input,
                LootTable existingInstance)
            {
                LootTable lootTable = existingInstance;
                if (lootTable == null)
                {
                    lootTable = new LootTable();
                }

                lootTable.Drops = input.ReadObject<List<GearDrop>>();

                return lootTable;
            }
        }
    }
}
